﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Csla.Core;

namespace Csla
{
    [Serializable]
    public class GBusinessBase<T> : BusinessBase<T>
        , Csla.OpenExpressApp.IEntityStatus
        where T : GBusinessBase<T>
    {


        public override void Delete()
        {
            base.Delete();
            if (typeof(ITreeNode).IsAssignableFrom(this.GetType()))
            {
                (this as ITreeNode).ParentNode = null;
            }
        }
        //protected override void OnPropertyChanged(string propertyName)
        //{
        //    base.OnPropertyChanged(propertyName);
        //    //执行计算过程
        //    if (null != RegisterCalculateRules.ICalculate)
        //        RegisterCalculateRules.ICalculate.PropertyChanged(this, propertyName);
        //}

        #region ITrackStatus Members

        void Csla.OpenExpressApp.IEntityStatus.MarkClean()
        {
            this.MarkClean();
        }

        #endregion
        #region Copy_Before_After

        public virtual void BeforeCopy() { }
        public virtual void AfterCopy() { }

        #endregion
    }
}